Gets the element width. The value -1 indicates auto width, no specific width constraint is to be imposed; the element's width is determined by the intrinsic width of its content.
Syntax
publicdouble getWidth()
Return Value
The width of the element's content rectangle, measured in default user space units in the inline-progression direction.